home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / mc < prev    next >
Encoding:
Text File  |  2010-11-16  |  1.1 KB  |  48 lines

  1. # bash completion for mc
  2.  
  3. have mc &&
  4. _mc()
  5. {
  6.     local cur prev split=false
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur prev
  10.  
  11.     _split_longopt && split=true
  12.  
  13.     case $prev in
  14.         -e|--edit|-v|--view|-l|--ftplog|-P|--printwd)
  15.             _filedir
  16.             return 0
  17.             ;;
  18.         -C|--colors|-D|--debuglevel)
  19.             # argument required but no completions available
  20.             return 0
  21.             ;;
  22.         -h|--help|-V|--version)
  23.             # all other arguments are noop with these
  24.             return 0
  25.             ;;
  26.     esac
  27.  
  28.     $split && return 0
  29.  
  30.     if [[ "$cur" == -* ]]; then
  31.         COMPREPLY=( $( compgen -W '--stickchars --nocolor --color --colors \
  32.             --nomouse --edit --datadir --resetsoft --ftplog --printwd --slow \
  33.             --termcap --nosubshell --subshell --view --version --xterm \
  34.             --debuglevel --help' -- "$cur" ) )
  35.     else
  36.         _filedir -d
  37.     fi
  38. } &&
  39. complete -F _mc -o filenames mc
  40.  
  41. # Local variables:
  42. # mode: shell-script
  43. # sh-basic-offset: 4
  44. # sh-indent-comment: t
  45. # indent-tabs-mode: nil
  46. # End:
  47. # ex: ts=4 sw=4 et filetype=sh
  48.